import React from 'react';
import {useLocation,useRouteMatch,useParams} from "react-router-dom";

const ChildAThree = function () {
    const location = useLocation();
    const match = useRouteMatch();
    const params = useParams();
    console.log(location);
    console.log(match);
    console.log(params);
    return (
        <>
            <h3>======================</h3>
            {
                Object.keys(match.params).map(key => {
                    return (
                        <>
                            {key}-{match.params[key]}
                        </>
                    )
                })
            }
            <br/>
            <h3>=========================</h3>
            {
                Object.keys(params).map(key => {
                    return (
                        <>
                            {key}-{params[key]}
                        </>
                    )
                })
            }
        </>
    )

};

 export default ChildAThree;